import instance from "@/utils/request";

let giftsToGoods={
    //分页查询
    searchPage(parems){
        return instance.get(`gifts-to-goods`,{params:parems})

    },

    searchPage1(parems){
        return instance.get(`gifts-to-goods/findByApproveStatus`,{params:parems})
    },
    //查询根据id查询审核记录
    findByGiftsId(id){
        return instance.get(`gifts-to-goods-info/${id}`)
    },
    //添加
    addGiftsEntity(entity){
        return instance.post(`gifts-to-goods-info`,entity)
    },


    //拿到下拉框的品牌信息
    getAllBrand(){
        return instance.get(`base-brand/findAllBrand`)
    },
    //拿到下拉框的分类信息
    getAllType(){
        return instance.get(`base-type/findAllType`)
    },
    //拿到下拉框的颜色信息
    getAllColor(){
        return instance.get(`color/findColor`)
    },
    //拿到下拉框的类型信息
    getAllModel(){
        return instance.get(`product/findProduct`)
    },
    //添加
    addEntity(entity){
        return instance.post(`gifts-to-goods`,entity)
    },
    //查询根据id查询
    findById(id){
        return instance.get(`gifts-to-goods/${id}`)
    },
    //修改
    updateEntity(entity){
        return instance.put(`gifts-to-goods`,entity)
    },
    /**
     * 删除
     */
    deleteById(id){
        return instance.delete(`gifts-to-goods/${id}`)
    },
    /**
     * 批量删除
     */
    batchDelete(ids){
        return instance.delete(`gifts-to-goods/batch/${ids}`)
    },
}

export default giftsToGoods;